<?PHP 
require_once "chilik_core.php";
/*
	Author: 	Suwandi Tan
	Country:	Indonesia, Jakarta
	Projects: 	MVClite Framework
	Core: 		KISS MVC re-modified
			Smarty Template
			SQLite DB
	License:	MIT License
	Dated:		25 July 2011
	
	This file is bootstrap procedure for calling core
	function on _core.php.
*/

class Controller extends MV_Controller
{
	private static $_instance = NULL; 	
	/*
	function __construct()
	{
		//parent::__construct();
		
	}
	*/
	public static function Init()
	{
		if(Controller::$_instance === NULL)
		{
			self::$_instance = new self();
		}
		
		return self::$_instance;
	}

	private function __clone()
	{
	}
}

/*
	View of my framework use Smarty Template for its
	rendering Engine.
*/

class View extends Template
{
	private static $_instance = NULL; 	
	
	function __construct()
	{
		parent::__construct();
	}
	
	public static function Factory()
	{
		if(self::$_instance === NULL)
		{
			self::$_instance = new self();
		}
		
		return self::$_instance;
	}
	
	private function __clone()
	{
	}
}

class Model extends MV_Model
{
	private static $_instance = NULL; 	
	
	function __construct() 
	{
	}
	
	public static function Factory()
	{
		
		if(self::$_instance === NULL)
		{
			self::$_instance = new self();
		}
		
		return self::$_instance;
	}
	
	private function __clone()
	{
	}
}


